import request from '@/utils/request'

const base_api = '/admin/product/brand'

export const GetBrandPageList = (page, limit) => {
  return request({
    url: `${base_api}/list/${page}/${limit}`,
    method: 'get',
  })
}

export const SaveBrand = brand => {
  return request({
    url: `${base_api}/save`,
    method: 'post',
    data: brand,
  })
}

export const UpdateBrand = brand => {
  return request({
    url: `${base_api}/update`,
    method: 'put',
    data: brand,
  })
}

export const DeleteBrand = id => {
  return request({
    url: `${base_api}/deleteById/${id}`,
    method: 'delete',
  })
}

export const FindAllBrand = () => {
  return request({
    url: `${base_api}/findAll`,
    method: 'get',
  })
}
